#[derive[Debug, PartialEq]]
pub struct Vector3D {
    pub x: f64,
    pub y: f64,
    pub z: f64,
}

// 向量加法

pub fn add(self, other: Vector3D) -> Vector3D {
    Vector3D {
        x: self.x + other.x,
        y: self.y + other.y,
        z: self.z + other.z,
    }
}

// 向量减法
pub fn subtract(self, other: Vector3D) -> Vector3D {
    Vector3D {
        x: self.x - other.x,
        y: self.y - other.y,
        z: self.z - other.z,
    }
}

// 向量数乘